import request from '@/utils/request'

export function getFileStream(method, {url, params}) {
  let par = {
    url,
    method,
    responseType: 'blob',
    contentType: method == 'get' ? 'multipart/from-data' : 'application/json',
  }
  par[method == 'get' ? 'params' : 'data'] = params
  return request(par)
}

export function findDocLastFileById(params) {
  return request({
    url: '/fileSystem/doc/findDocLastFileById',
    method: 'get',
    params
  })
}
